package com.jniu.customviewprogram.actrivity;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;

import com.jniu.customviewprogram.R;
import com.jniu.customviewprogram.view.ActionSheetDialog;
import com.jniu.customviewprogram.view.IosAlertDialog;

public class IosDialogActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_ios_dialog);

    }

    public void btnClick(View view) {
        switch (view.getId()) {
            case R.id.btn_ios_dialog:
                IosAlertDialog dialog = new IosAlertDialog(this).builder()
                        .setTitle("标题")
                        .setMsg("内容")
                        .setCancelButton("取消",null)
                        .setOkButton("确定",null)
                        .show();
                break;
            case R.id.btn_ios_bottom_dialog:
                ActionSheetDialog dialog1 = new ActionSheetDialog(this).builder()
                        .addSheetItem("拍照", ActionSheetDialog.SheetItemColor.BLACK, new ActionSheetDialog.OnSheetItemClickListener() {
                            @Override
                            public void onClick(int which) {

                            }
                        })
                        .addSheetItem("相册", ActionSheetDialog.SheetItemColor.BLACK, new ActionSheetDialog.OnSheetItemClickListener() {
                            @Override
                            public void onClick(int which) {

                            }
                        });
                dialog1.show();
                break;
        }
    }
}
